package day09;

public class interfacePrc01 {
    public static void main(String[] args) {
        Student1 s1 = new Student1();
        s1.drink();
        s1.eat();
        s1.study();
        Inter1 s2=new Student1();
        s2.play();
        s2.study();
        System.out.println("接口1中的静态成员常量"+s2.age);
        Inter2 s3=new Student1();
        s3.drink();
        s3.eat();

    }
}
interface Inter3 extends Inter1,Inter2{};
interface Inter1{
    void play();
    void study();
    int age=10;

}
interface Inter2{
    void eat();
    void drink();
}
class Student1 implements Inter3{
    public Student1() {
        super();
        System.out.println("我是Student1的无参构造");
        System.out.println(age);
    }

    @Override
    public void study() {
        System.out.println("好好学习");
    }

    @Override
    public void eat() {
        System.out.println("好好吃饭");
    }

    @Override
    public void drink() {
        System.out.println("好好喝水");
    }
    @Override
    public void play() {
        System.out.println("不玩");
    }
}